import { Component, OnInit, ViewChild } from '@angular/core';
import { GoodsListComponent } from '../../components/goods-list/goods-list.component';
import { ApisService } from '../../apis.service';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
  @ViewChild('goodsList')  goodsList: GoodsListComponent;
  constructor(private apiService:ApisService) { }
  web_ads:any={};
  ngOnInit() {
    this.apiService.category().then(cats=>{
      this.web_ads = cats.web_ads;
    });
  }

}
